package com.ee.chat.admin.controller.systemmanage;

import com.ee.chat.admin.service.IOperationService;
import com.ee.chat.common.bean.Result;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;

/**
 * @Author Shane
 * @Date 2019/11/30 19:15
 */
@RestController
@RequestMapping("operation")
public class OperationController {
    private Logger log = LoggerFactory.getLogger(OperationController.class);

    @Resource
    IOperationService operationService;

    @RequestMapping("list")
    public Result list(HttpServletRequest request, @RequestParam Integer page, @RequestParam Integer limit,
                       String keyword, String describe, String createTime){
        try {
            return operationService.list(request, page, limit, keyword, describe, createTime);
        } catch (Exception e){
            log.error("【获取操作日志列表错误】", e);
        }
        return Result.returnFailure();
    }
}
